package com.atues.extendinter;

public abstract class Animal {
    private int age;//子类也不能访问private
    public double weight;
    protected int sex;//0male 1female

    int size;//默认权限修饰符，同一个包下可以访问

    public Animal() {
    }
    //全参数构造方法
    public Animal(int age, double weight,int sex) {
        this.age = age;
        this.weight = weight;
        this.sex = sex;
    }

    public void eat(){
        System.out.println("动物吃东西");
    }

    public abstract void screem();
}
